package com.sweet.mealon.face.daily.lock.concurence.threadLocal;

import lombok.AllArgsConstructor;

/**
 * faceDaily
 *
 * @Author: craizer.huang
 * @Date: 2021/5/1 14:49
 **/
@AllArgsConstructor
public class ThreadLocalThread implements Runnable {

    private ThreadLocal<String> threadLocal;
    private  int a;
    public void run() {
        String msg = String.format("thread-%s",String.valueOf(a));
        threadLocal.set(msg);

        System.out.println(String.format("thread name:%s,msg:%s",Thread.currentThread().getName(),msg));
    }
}
